feat: import MyBMAD web dashboard alongside VS Code extension#5
Conversation
|
Important Review skippedToo many files! This PR contains 201 files, which is 51 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (16)
📒 Files selected for processing (201)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
here are my thoughts on this. thanks!
I would go for apps/web so it will be compliant with the monorepo.
Doing it now would be a single big move; doing it later as its own PR keeps this one focused on the import.
Review and merge ownership going forward on this repo. |
PR Review: #5Title: feat: import MyBMAD web dashboard alongside VS Code extension Findings1. Static imports hoisted above
|
|
Thanks for the detailed review. Since this PR is intended as a verbatim import from DevHDI/my-bmad, I’m going to address the confirmed findings upstream first, then re-import the fixed upstream HEAD into this branch. That keeps the import auditable and avoids creating two divergent versions of the web app. I’ll keep this PR open as draft while doing that. I’m also triaging the Raven findings before changing code: a few look like hardening or false positives rather than critical bugs, so I’ll document those explicitly in the PR description when the re-import is pushed. |
Coordinates the BMAD UI ecosystem under one repository (per BMadCode's Discord proposal) by importing the standalone Next.js dashboard from DevHDI/my-bmad@575f6f5 into web/, side-by-side with the existing VS Code extension under src/. Scope is intentionally minimal: - Exact verbatim import via `git archive HEAD` from DevHDI/my-bmad@575f6f5 (post-merge of the four fix PRs that address findings raised in Raven's Verdict review of this PR — see the PR description for the full mapping) - Zero changes inside src/ — the extension build, lint, type-check, and tests are unaffected - Root eslint.config.mjs ignores web/** so the extension's strict TypeScript rules do not lint the Next.js code with extension-only policies - Root .prettierignore ignores web/ for the same reason - Root README updated with a "Repository structure" section documenting the side-by-side layout Out of scope (deferred to follow-up PRs once Brian and Evie weigh in): - pnpm workspace / monorepo restructuring - Shared parser package (each subproject keeps its own parser for now) - CI for the web dashboard - Preview deployment / hosting Note on web/.github/: the import is verbatim, so a nested .github/ folder is included for provenance. GitHub only executes workflows under the repository's top-level .github/workflows, so the nested ones do not run. Verification: - pnpm install --frozen-lockfile (root): clean - pnpm typecheck (extension + webview): clean - pnpm test (extension): 706/706 - pnpm build (extension): produces extension + webview bundles - pnpm lint (extension): clean (only the 2 pre-existing no-console warnings; no web/ files scanned) - cd web && pnpm install --frozen-lockfile: clean - cd web && pnpm tsc --noEmit: clean - cd web && pnpm test: 151/151 - cd web && pnpm build: clean
62aff63 to
e83c15d
Compare
Re-import complete — all confirmed Raven's Verdict findings addressed upstreamForce-pushed the branch to point at
The PR description above has been rewritten with a full mapping table: each Raven finding → the upstream PR that fixed it (or the issue tracking it for follow-up, or the documented reason why it was a false positive — #1, #5, #9, #18 — with file/line evidence). Two findings were intentionally deferred to dedicated follow-ups because they need design/migration work that doesn't belong in this import PR: #12 baseline CSP and #13 role enum migration. This branch remains a verbatim Happy to discuss any specific finding (especially the four marked false-positive) before this lands. |
|
This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it. |
Summary
Coordinates the BMAD UI ecosystem under one repository (per @bmadcode's Discord proposal) by importing the standalone Next.js dashboard from
DevHDI/my-bmad@575f6f5intoweb/, side-by-side with the existing VS Code extension undersrc/.This PR is intentionally a draft — it asks for approval on the structure before any merge. No
src/file is touched; @evie's extension is unchanged.Scope (intentionally minimal)
git archive HEADfromDevHDI/my-bmad@575f6f5(post-merge of the four fix PRs addressing the Raven's Verdict review — see "Findings" section below)src/— extension build, lint, type-check, tests are unaffectedeslint.config.mjsignoresweb/**so the extension's strict TypeScript rules don't lint the Next.js code with extension-only policies.prettierignoreignoresweb/for the same reasonREADME.mdupdated with a Repository structure section documenting the side-by-side layoutOut of scope (deferred to follow-up PRs)
parserpackage extracted from both subprojects (the two implementations cover similar ground but have very different runtimes — VS Code extension vs. multi-user Next.js)Note on
web/.github/The import is verbatim, so a nested
.github/folder is included for provenance. GitHub only executes workflows under the repository's top-level.github/workflows, so the nested ones atweb/.github/workflows/are imported as files but do not run as active GitHub Actions.License
DevHDI/my-bmadwas relicensed from AGPL-3.0 to MIT inDevHDI/my-bmad@81b28eaprior to this import, so the entire repository is now MIT-consistent. The importedweb/LICENSEcarries the standard MIT text.Verification
Both subprojects pass all checks independently:
Extension (root) — unchanged:
pnpm install --frozen-lockfile— cleanpnpm typecheck(extension + webview) — cleanpnpm test— 706/706pnpm build— produces extension + webview bundlespnpm lint— clean (only the 2 pre-existingno-consolewarnings; noweb/files scanned)Web (
web/) — newly imported:pnpm install --frozen-lockfile— cleanpnpm tsc --noEmit— cleanpnpm test— 151/151pnpm build— cleanFindings from Raven's Verdict review (addressed upstream)
The Raven's Verdict review raised 18 findings. To keep this PR a true verbatim import, all findings were addressed upstream in
DevHDI/my-bmadacross 4 thematic PRs that were merged before this re-import. The new SHA575f6f5reflects the post-fix state.Fixes applied upstream
after-hook + dedicated route normalizing HTTP status to prevent account enumerationlistRepoBranchesreturnsNOT_FOUNDwhen the repo is not owned by the caller, blocking unscoped GitHub proxyingdetectBmadReposcapped atMAX_DETECT_REPOS=2000withLIMIT_EXCEEDEDearly returnrevalidateTagmoved to after the GitHub fetch + DB update succeedrequest.json()wrapped in try/catch → 400 instead of 500/api/revalidaterate-limited post-auth with a global keyCMD:;→&&so the container fails fast on broken migrations.env.examplereplaced realisticbmad_dev_passwordwith<your-db-password>placeholderrate-limit.tsdeclaring the in-memory MVP scopeextendBmadDirssilent catch →console.warnwith context (security invariant still enforced byassertSafePath)detectBmadReposreturnsboolean | nullso callers distinguish "unknown" from "confirmed no"; dialog surfaces the unknown count to the userparsingErrorRatereturned asnulland rendered "N/A — Not yet tracked" instead of fabricated0%Follow-up issues tracked upstream
User.roleto a Prisma enum requires a migration + data audit; deserves its own PRDocumented as false positives (no code change)
ALLOW_REGISTRATIONis read lazily inside Better Auth'sbeforehook at request time, not at module init. ESM static-import hoisting does not affect it; thecreate-adminscript works as intended.web/src/lib/auth/auth.ts— see thehooks.beforemiddleware that checksprocess.env.ALLOW_REGISTRATIONat call timeLocalProvider.assertSafePathalready enforces: null-byte rejection, Unicode slash rejection (U+2215, U+FF0F),path.resolve+ boundary check (blocks absolute paths and traversal), and abmadDirswhitelist on the first segment. Schema-level..blocking is defense-in-depth, not the primary boundary.web/src/lib/content-provider/local-provider.ts:216-237revalidateTag(tag, profile)with a second argument. The"default"profile is not spurious.web/package.jsonpinsnextat16.1.6; the Next.js source for that release defines the two-argument signaturerequireAdmin()at the action layer is the authoritative boundary, not dead code.web/src/app/(dashboard)/admin/page.tsx(page-level redirect for UX) +web/src/actions/admin-actions.ts(action-levelrequireAdmin()as authority)Open questions
web/(proposed),dashboard/,apps/web/?pnpm-workspace.yamland anapps/+packages/layout? Doing it now would be a single big move; doing it later as its own PR keeps this one focused on the import.parserpackage from bothsrc/extension/parsers/andweb/src/lib/bmad/makes sense long-term, but it's a non-trivial refactor that touches both surfaces. Worth a dedicated discussion before any code change.Note on review
216 files changed — most of them are an exact import. The history of those files lives at
DevHDI/my-bmadand includes the four fix PRs whose squashed commits sit on top of the original relicense commit (81b28ea). Please focus the review on:README.md,eslint.config.mjs,.prettierignore, the newweb/directory at the top)